<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro=http://www.pollix.at/thymeleaf/shiro>
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" th:href="@{/css/register.css}"/>
    <title>Title</title>
    <script th:src="@{/js/jq.js}"></script>
</head>
<body>
<div class="lo">
    <form action="/zhuu">

        <input type="hidden"  th:value="${u}" id="u"/>
        <table>


            <tr>
                <td>用户名：</td>
                <td>
                    <input type="text" name="name" id="na"/>
                </td>

            </tr>
            <tr>
                <td>密码：</td>
                <td>
                    <input type="password" name="password" id="pa"/>
                </td>
            </tr>

        </table>
        <input type="submit" value="注册" class="btn" id="bt"/><br>

    </form>
</div>
</body>
<script>

    $(function () {
        $("#bt").click(function () {
            if($("na").val()=="" || $("#pa").val()==""){
                alert("用户名或密码不能为空")
            }



        })


    })

</script>
</html>